package com.example.raspberryPi_demo.mapper;

import com.example.raspberryPi_demo.entity.CollectedData;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * CollectedDataDAO继承基类
 */
@Repository
public interface CollectedDataDAO extends MyBatisBaseDao<CollectedData, Integer> {
    int deleteByPrimaryKey(Integer timestamp);

    int insert(CollectedData record);

    int insertSelective(CollectedData record);

    //@Select("select * from test")
    List<CollectedData> selectAll();

    CollectedData selectByPrimaryKey(Integer timestamp);

    CollectedData selectByMacAddress(String macAddress);

    List<CollectedData> selectByTimeBucket(String startTime, String endTime);

    int updateByPrimaryKeySelective(Integer timestamp,CollectedData record);

    int updateByPrimaryKey(Integer timestamp,CollectedData record);

}